package net.xxcxcxcx.xc_enhancedmob.render.boss_bar.unit.type.cover;

import net.minecraft.nbt.NbtCompound;
import net.xxcxcxcx.xc_enhancedmob.render.TextureElement;

import static net.xxcxcxcx.xc_enhancedmob.render.boss_bar.unit.type.BossBarTypeHelper.AllBossBarReality;

public abstract class BaseBossBarCoverType implements BossBarCoverType {
    float MeterOffsetX;
    float MeterOffsetY;
    TextureElement meterCover;

    @Override
    public void readCustomDataFromNbt(NbtCompound nbt) {
        BossBarCoverType.super.readCustomDataFromNbt(nbt);
    }

    @Override
    public int getId() {
        for (int i = 0; i < AllBossBarReality.size(); i++) {
            if (AllBossBarReality.get(i) == this.getClass()) {
                return i;
            }
        }
        return -1;
    }

    @Override
    public int getMeterOffsetX() {
        return 0;
    }

    @Override
    public void setMeterOffsetX(int meterOffsetX) {
        this.MeterOffsetX = meterOffsetX;
    }

    @Override
    public int getMeterOffsetY() {
        return 0;
    }

    @Override
    public void setMeterOffsetY(int meterOffsetY) {
        this.MeterOffsetY = meterOffsetY;
    }

    @Override
    public TextureElement getMeterCover() {
        return meterCover;
    }

    @Override
    public void setMeterCover(TextureElement meterCover) {
        this.meterCover = meterCover;
    }
}
